set(systemsettingsview_LIB_SRCS
    BaseData.cpp
    BaseData.h
    BaseMode.cpp
    BaseMode.h
    ExternalAppModule.cpp
    ExternalAppModule.h
    kcmmetadatahelpers.h
    MenuItem.cpp
    MenuItem.h
    MenuModel.cpp
    MenuModel.h
    MenuProxyModel.cpp
    MenuProxyModel.h
    ModuleView.cpp
    ModuleView.h
)

ki18n_wrap_ui(systemsettingsview_LIB_SRCS externalModule.ui)

add_library(systemsettingsview ${systemsettingsview_LIB_SRCS})
generate_export_header(systemsettingsview)

target_link_libraries(systemsettingsview
    KF5::ItemViews
    KF5::KCMUtils
    KF5::I18n
    KF5::KIOWidgets
    KF5::Service
    KF5::IconThemes
    KF5::Activities
    KF5::AuthCore
    KF5::AuthWidgets
    KF5::Kirigami2
)

set_target_properties(systemsettingsview PROPERTIES SOVERSION 3)

install(TARGETS systemsettingsview ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
install(FILES
        systemsettingsexternalapp.desktop
        infocenterexternalapp.desktop
    DESTINATION ${KDE_INSTALL_KSERVICETYPESDIR}
)
